package com.jyxd.web.data.basic;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;
import java.util.Date;

/**
 * 引流管插拔记录
 */
@ApiModel("引流管插拔记录")
@Entity
@Table(name = "table_drainage_tube_record")
@Data
public class DrainageTubeRecord {

    /**
     * 序列
     */
    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @Id
    @Column(name = "id", length = 32, nullable = false)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid.hex")
    private String id;

    @ApiModelProperty("患者id")
    @Column(name = "patient_id")
    private String patientId;

    @ApiModelProperty("插管时间")
    @Column(name = "intubation_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date intubationTime;

    @ApiModelProperty("拔管时间")
    @Column(name = "tube_drawing_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date tubeDrawingTime;

    @ApiModelProperty("描述")
    @Column(name = "describe_content")
    private String describeContent;

    @ApiModelProperty("插管深度")
    @Column(name = "depth")
    private String depth;

    @ApiModelProperty("插管执行人")
    @Column(name = "intubation_executor")
    private String intubationExecutor;

    @ApiModelProperty("拔管执行人")
    @Column(name = "tube_drawing_executor")
    private String tubeDrawingExecutor;

    @ApiModelProperty("插管状态")
    @Column(name = "status")
    private int status;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    @ApiModelProperty("是否非计划 (1 是 2 否)")
    @Column(name = "plan_flag")
    private Integer planFlag;

    @ApiModelProperty("管路名称")
    @Column(name = "tube_drawing_name")
    private String tubeDrawingName;
}
